Skip to content

Comments

feat: add deletion confirmation dialog#6

Merged
struong merged 3 commits intomasterfrom
struong/confirm-deletion
Jan 4, 2026
Merged

feat: add deletion confirmation dialog#6
struong merged 3 commits intomasterfrom
struong/confirm-deletion

Conversation

@struong
Copy link
Owner

@struong struong commented Jan 4, 2026

motivation

Accidental repository deletion is irreversible and can cause significant data loss. Users need a safety mechanism to prevent unintended deletions when pressing Enter in the staging area.

change

  • Added ConfirmDeletion app mode between Staging and Deleting
  • Created a centered confirmation dialog that prompts users to type the number of repos to delete
  • Modified Enter key in Staging mode to show confirmation dialog instead of immediately deleting
  • Added confirmation_input field to AppState for tracking user input
  • Updated header to show "CONFIRM" mode indicator
  • Added keybindings for confirmation mode (Enter to confirm, Esc to cancel)

testing

  • cargo build and cargo clippy pass
  • Manual testing:
    1. Stage repos for deletion → Press Enter
    2. Dialog appears: "Type X to delete X repos:"
    3. Type correct number + Enter → Deletion proceeds
    4. Type wrong number + Enter → Warning message shown
    5. Press Esc → Returns to Staging mode
CleanShot 2026-01-04 at 13 16 06@2x

Requires users to type the number of repos to confirm deletion.
Press Esc to cancel and return to staging area.
@struong struong merged commit 55d9197 into master Jan 4, 2026
3 checks passed
This was referenced Jan 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant